#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
int w[MAXN];
int main() {
  int n, t;
  cin >> n >> t;
  for (int i = 1; i <= n; i++) {
    cin >> w[i];
  }
  sort(w + 1, w + n + 1);
  int i = 1, j = n;
  int ans = 0;
  while (i < j) {
    if (w[i] + w[j] <= t) {
      i++, j--;
    } else
      j--;
    ans++;
  }
  if (i == j)
    ans++;
  cout << ans;

  return 0;
}